<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<title></title>
<base href="<%=basePath%>">
<%@ include file="/base/jsp/include.jsp"%>
<script type="text/javascript">
	var grid;
	/* var creditsFun = function() {
		var rows = grid.datagrid('getSelections');
		if (rows.length != 1) {
			parent.$.messager.w('请选择一条记录进行查看！');
			return;
		}
		var nickName="";
		if(rows[0].nickName!=null&&rows[0].nickName!=""){
			nickName=rows[0].nickName;
		}
		var url = sy.contextPath + '/go.do?path=user/userCreditLogList&id=' + rows[0].id;
		var dialog = parent.sy.modalDialog({
			title : '积分日志——'+nickName,
			width : 800,
			height : 620,
			url : url
		});
	}; */
    /* var delFun = function() {
        var rows = grid.datagrid('getSelections');
        if (rows.length == 0) {
            parent.$.messager.w('请选择需要删除的记录！');
            return;
        }
        parent.$.messager.confirm('询问', '您确定要删除此记录？', function(r) {
            if (r) {
                var ids = [];
                for ( var i = 0, l = rows.length; i < l; i++) {
                    var r = rows[i];
                    ids.push(r.id);
                }
                var id = ids.join(',');
                
                $.post(sy.contextPath + '/activitymessage/del.do', {
                    id : id
                }, function() {
                    rows.length = 0;//必须，否则有bug
                    grid.datagrid('reload');
                }, 'json');
            }
        });
    }; */
	$(function() {
		
		var menu;
		menu={
				url : sy.contextPath + '/myActivity/JoinList.do',
				toolbar : '#toolbar',
				singleSelect : false,
				columns : [ [ {
					width : $(this).width() * 0.06,
					title : '活动名称',
					field : 'activityName',
					align : 'center'
				},{
					width : $(this).width() * 0.1,
					title : '姓名',
					field : 'name',
					align : 'center'
				},{
					width : $(this).width() * 0.1,
					title : '人数',
					field : 'number',
					align : 'center',
				},{
					width : $(this).width() * 0.1,
					title : '单位',
					field : 'company',
					align : 'center',
				},{
					width : $(this).width() * 0.08,
					title : '职务',
					field : 'job',
					align : 'center',
				}, {
					width : $(this).width() * 0.1,
					title : '联系方式',
					field : 'phone',
					align : 'center',
				}
				] ]
			};
		
		grid = $('#grid').datagrid(menu);
	});
</script>
</head>
<body class="easyui-layout" data-options="fit:true,border:false">
	<div id="toolbar" style="display: none;">
		<table>
            <tr>
                <td>
                    <table>
                        <!-- <tr>                          
                            <td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_delete',plain:true" onclick="delFun();">删除</a></td>
                        </tr> -->
                    </table>
                </td>
            </tr>		
			<tr>
				<td>
					<form id="searchForm">
						<table>
							<tr>
								<td>活动名称：</td>
								<td>
									<input type="text" class="easyui-textbox" name="name" style="width: 150px"  />
								</td>
								<td>
									<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-zoom',plain:true" onclick="grid.datagrid('load',sy.serializeObject($('#searchForm')));">过滤</a>
									<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-zoom_out',plain:true" onclick="$('#searchForm input').val('');grid.datagrid('load',{});">重置过滤</a>
								</td>
							</tr>
						</table>
					</form>
				</td>
			</tr>
		</table>
	</div>
	<div data-options="region:'center',fit:true,border:false">
		<table id="grid" data-options="fit:true,border:false"></table>
	</div>
</body>
</html>